<?php/** * Created by PhpStorm. * User: goouc * Date: 2019/9/10 * Time: 14:14 */global $_W,$_GPC;$phone = $_GPC['phone'];$code = $_GPC['code'];if(empty($phone) || empty($code)){    return $this->getresult(1,'未获取到手机号或用户所填验证码',['code'=>3003,'msg'=>'未获取到手机号或用户所填验证码']);}$info = pdo_fetch("SELECT `code`,`createtime` FROM " . tablename($this->t_phonecode) . " WHERE phone = :phone AND weid = :weid ORDER BY `createtime` DESC ", array(':phone'=> $phone,':weid'=>$_W['uniacid']));if ($code != $info['code']) {    return $this->getresult(1,'验证码错误',['code'=>3001,'msg'=>'验证码错误']);} else {    $time = time()-$info['createtime'];    if ($time > 300) {        return $this->getresult(1,'验证码过期',['code'=>3002,'msg'=>'验证码过期']);    } else {        return $this->getresult(0,'验证码正确',['code'=>200,'msg'=>'验证码正确']);    }}